bugfix: space in query could lead to incorrect results