Fixing 32-bit problems with task id conversions