Changed to delete[] for char array