remove redundant code for the quit dialog