correction for memory allocation errors on windows due to reduced address space

other issues also corrected

see issue #3 on github