Fix model deletion