Working build on win32
Fixed overflow (thx msvc)
fixed conflicts