fix boost on windows and null reference exception