Fix bug in registerHelper