fragment to fragment interface and transaction replace

I created a default android page the one with 3 tabs and fragment manager and I have added 2 more fragments to it and so far everything has been working fine till I try to send a interface to the main activity and send the data from there to the third fragment by bundle and transaction:

LIke This:

 public void setF4Riddle(int x){
    Frag4 F4 = 
 (Frag4)getSupportFragmentManager().findFragmentById(R.id.frag4);


    if (F4 != null ) {
        F4.getF4Riddle(x);

    } else {
        Frag4 fragment = new Frag4();
        Bundle args = new Bundle();
        args.putInt("Value", x);
        TextView Dialog =(TextView)findViewById(R.id.Dialog);
        Dialog.setText("");
        fragment.setArguments(args);
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.frag4_container, fragment)
                .addToBackStack(null).commit();
        fragment.getF4Riddle(x);
    }


}

and it works fine with Fragment 4 ( its from fragment 5 to 4) but when I try the same thing with fragment 3 it crashes (crash happens in transaction replacement , it doesnt replace the frag3 layout) in fact ive tried with fragment 2 and 1 in all cases the game crashes ( 1 ,2 ,3) but when i add more fragments (6 and 7) it works again so it seems like only the first 3 dont work does anyone know the reason? Thank You