Also I'm using KiTTY (instead of PuTTY), but your program doesn't get KiTTY sessions, only PuTTY ones.