Changed the destroy list function