fixed bug in ModelTextIO