Adding changes to fix add/remove views when resume/pause