Fix a memory corruption an remove some strcat