You had BGCLR before it entered @LOOP so you erased it. The GOTOs after GOTO @LOOP are doing nothing there.