fixed uploading issue for images