Fixed seg faults in list