sort roles, handle autoscroll on groups