Fixing bug of data truncation