fixed another bug in truncate