Fix threading issue in ModelDefinition