Workarounds for oartifact size

oartifact is a char, which is causing all kinds of problems

Cast it to an unsigned char whenever it is used.