fixed reg error