Fix prequery