Dirty flag checking

Change-Id: Ic7818999ac8ae96e9a8e4dc5292e1cc68bb23c07