fix register issue