Update dirty flag, and correct the prompt