fix register redirect