Fixed bugs due to 64-bit pointer.