fixed issue where any keypress but back button failed