Marking loops as completed