fix compaction detection