fixed conversion of 8 bit values