minor fix in truncate helper