fixed issue #2 exception during registration