added Amazon S3 fix for heroku