Fix reading bug