Fixed broken cast for unsigned int32 constants.
More conservative fix of casting of constants issue.