Refactored things out into a channel select statement to avoid concurrency issues with termbox