FIX wrong substition in queries
Merge pull request #7450 from geops/develop

FIX wrong substition in queries