fix/pi-compaction-safety