fixed bug in list_index() that didn't allow accessing index 0