[caveman] fix query context