fix 32/64 bit bug
fix missing casts in program options