Corrected bug in ModelManager