Some tweaks to be heroku friendly