fixes for windows and 32bit mode