Fix some sqlslite issues for Heroku deloyment