fixed a bug for win32 but giving up on win32 no hope for windows