fixed bug in setting record name