try to fix bug in query