[RFC] Fixes to channel.c, input.c and functional test helpers.lua