Fix for multiple group membership and additional debug statements