fix for registering twice