fix for parsing different query base.