fixed markDirty in flushPage method