Some 64 bit support fixes