fixed truncate detection