Fix for issue 295 and more awesomeness

It took me days but it worths it, because along the way tweaked some vars and methods in CoSeMe and now IT NEVER DISCONNECTS!!! :tada: :tada: :tada: