fixed recently introduced bug in ModelContainer