Fix SQL Issue for heroku