fix receive exception when input is set to nil