Patch up for 64 bit, account for all memory
make safe for 32bit again