Indentation fix; handling circularity of list