help troubleshooting invalid queries