Fixed a isDirty bug