Fixed a bug in the truncation strategy where the SQL deletion would cause the process to crash.