Fixed channel code sample to not use a pointer