Minor changes to be more multiple-channel friendly.