fixed conversion method for "byte" datatype