SONAR-3755 Fix query