Fixes 8-bit code in issue #2821

Fixes issue #2821