Server was crashing on invalid queries