Replace GOTO @LOOP1 with RETURN and put GOTO @LOOP in line 9.