fix register validation