Fixed Role & Register problem

Fixed structure role and register problem