Workaround for activity recreation after back button is pressed