fix getSessionInfo in QueryHelper and its test