Fix isDirty(). Fixes #141.