Do not register hooks and eventhandlers twice, closes #727, closes #484.
Merge pull request #1078 from cmfcmf/#727#484

Do not register hooks and eventhandlers twice, closes #727, closes #484.