fix dirty check