A few minor fixes after testing on 64-bit