Fix for menu and back press issues