fix the bug cannot register