Fix for uploading photos.