fixing global leak in list