avoid some strncpy usage