Fixed a bug with role_type