fix typo in removeTruncationRecord
improve cell index tracing
fix NPE