fix for windows memory bug in boost - heap corruption galore