the same fix for array queries