some modification to get x86_64 compiling