stray blank line
whenRegistered -> onRegistered