Edited code to work with the latest build of KF 2 (not dot net yet).

Please forgive the blatant disregard of best practices for the use of the goto statement. What can I say, but I was young and stupid.