fixed 32-bit conversion and delay bugs