support both 32-bit and 64-bit Linux
Fixed argment passing to callback