fixed RegisterHandler