several fixes, added safety checks for role_assignment param types