Fixed handling of group while sudo-ed