Fixed a bug in list_index after adding some unit test to the list implementation.