Fix to channel in release mode caused by having code that actually does something in assert