fixed bug in normalizing group names added more diagnostics