safer dirty check