Fixing the main activity onfocus