Fix attachment uploading