Make sure worker doesn't continue in background after navigating away from code mode.