fix transpose for char and double types.