some fixes

now it's work

tested on win7x32