It's hard to tell without seeing the whole script.

In the snippet you have posted your ":end" subroutine might execute the "Return". If it does processing will return to the line after the gosub and cotinue to execute the statments.

This means that your ":win2k_sp2" subroutine will be executed a second time, without being called as a subroutine.

As a simple example:

code:

Gosub MySub

:MySub
"Executing subroutine" ?
Return

Exit


If you run this code "Executing subroutine" will print twice.

Put an exit before the subroutine like so:

code:
Gosub MySub

Exit 0

:MySub
"Executing subroutine" ?
Return

Exit


And the subroutine will only execute once, as expected.