fix issue: dirty flag is in the opsite side.