Fix issue when registering without api key