typo in query builder, fixes #832