Query consulta fix