bug fixes

Took less than a minute from putting in a channel
to get a traceback and a crash. Fixed.