debug fixed query