fix bug in truncate filter