fixed truncate bug