Fix register method.