Merge "compaction: fix two small bugs"