Fixed exit bug (on back button press)