fix for issue #19, error in list clean up