Fix registration. Add logs.