Bug fix to writing to nil channel.