corrected error when calling name var

corrected error when calling name var