Fix empty queries