Added logic to make sure isn't already registered.