Updated for sqlite3 problems associated with Heroku