fixed problem with emptying list