Fixed infrastructure when register was called to many times

Signed-off-by: Anders Bech Mellson <mellson@icloud.com>