Fix reading of models