use correct method to disable the name field

fixes #1025