improved handling of instance state: 1) also store isInEquals, prevents erroneous handling of stack; 2) Stack cannot be stored in savedinstancestate, since when activity is destroyed, it will be restored as arraylist, causing classcastexception