more sql fixes for heroku