Fix backbutton infinite loop

Fixed the bug introduced by the implementation of Query page. This is
because I don't want to kill QueryActivity when app is still running, so
I have to overwrite onBackPressed(), which leads to the bug.