multi channel support

Additional changes to normalize_output() required for proper multi channel support.