minor code fixes
responding to button pressed or value