Fix for Heroku and Amazon S3