fixed error in name checking
fixed name checking