Improved role handling.