Bug in list insertions