Fixed pref check for onresume in fragments

Plus, other changes i don't remember.