Merge pull request #310 from archSeer/master

64-bit pointer precision loss fix
64bit pointer cast fix for debug builds