Fix invalid queries handling