Fix alignment issues for reading bytes