fix register handlers