fixed list breakage on RemoveFirst and RemoveLast