fix compile errors

fixes to compile in windows