Fixed a bug with apply_channel(), which has now been renamed to apply_pattern().