rem: PLSave(database->appDomain, YES);
add: if (database->appDomain) { struct stat stbuf; char *path; Bool release = False;  PLSave(database->appDomain, YES); database->dirty = 0; if (!database->path) { path = wdefaultspathfordomain(WMGetApplicationName()); release = True; } else { path = database->path; } if (stat(path, &stbuf) >= 0) database->timestamp = stbuf.st_mtime; if (release) wfree(path); }
context: WMSaveUserDefaults(WMUserDefaults *database){    PLSave(database->appDomain, YES);}