Fix reading from file