fixed fragment lifecycle issues