fixed error when not uploading image