Fix reading binary