Fixed uploading of images