fix to missing import on smart_truncate function