fixing heroku db issues

added a line to close db connections, not sure why AR doesn't do it automatically but it seems to work. Not fully tested