fix bugs of byte data type
change data access method to avoid potential error