Fixed broken unit test caused by not setting dirty flag