fix groups lookup and error using six.u