Fixes some 64-bit compatibility stuff