Fixing deprecations and 64bit