Adding self-edges