fix a blown query