Latest changes for 64bit compatibility