Sometimes a compiler bug pops up. Here is one: the integer math command Mul int, const is buggy! So don't use it. For instance:
Mul j%, 2
Replace it with a mathematical instruction like:
j% = j% *2
or use the function variant:
j% = Mul(j%,2)
This bug is reported when j% is a ByRef parameter of a subroutine. I verified it and it is a bug indeed. I'm not aware of problems in other situation.