[PD] dirty flag could be cleaner?