fixed perm reg error