Fixed broken Amazon S3 image upload