Fix bug around strlen