A couple of fixes: before the IF B==#A lines write another line that is IF B==#A THEN GOSUB @FADE; or write GOSUB @FADE at the start of @BEGIN and @INSTRUCTION parts of the code.