Fixed bug of the location for appending to list2 in main loop