fixed a bug where OnChannelDeleted wasn't always called
updated include with new wait parameter for TSC_Connect
fixed a potential infinite loop with new 'wait' parameter
fixed a bug where SetChannelType wasn't always working