Fixes issue with disappearing fragments.