fix register issues