Fixes a bug in ModelsManager