bugfixes in isDirty