Fix model uploading for the case that haven't uploaded model before