fix #11 and other "back" button scenarios