Fix potential memory leak in EnginioModel