Making the code compatible with 64bit compilers