Fixed cannot register bug