Added custom markDirty() support