Slightly fix the problem with loop_labels
Fixup performance problem with dot