Set dirty flag to false when it's written back