Bugfixes in local registering.