Update name to definition to use the name from the definition block

Fixes handler calling problems related to to naming inconsistency.