The J=3 statement isn't executed when VAR8=1 because you're telling to jump to beper.

If you want to set J=3 when the IF statement is true then
Code:
IF var8 = 1 then
  J=3
  Goto beper
ENDIF
or simply move J=3 to after the beper label in your program.

/Henrik.