Fix cast exception when obtaining tokenID via email