removed a str replace for queries which would in rare cases give
unwanted results