fixed dirty exit