thread fixes. Added debug winForm