fix query syntax error introduced in 1.5.1