Fix wrong termination of fail compaction preparation