fix problems in query Compatible