remove registerBeforeHandler from register