[Bugfix] fixed a query that didn't work on heroku