fixed error thrown when getting email