fix switch fragments crash problem