Fixed uploading-images code