Fixed bug where dirty flag fails when sequencing