switch loop protection