fix for issue #3479 (Algorithm::set UCHAR)