bug in bookkeeping reset dirty data instead of keeping minimum