fix bug on dirty control