Eliminate errors on quitting