fix few bugs in leak tracker

fix few bugs in leak tracker - now it works perfect on Windows XP
(32-bit)