Did the routine causing the problem include a mode change? If so, it might be a different issue altogether: