Ferraris Charles Leclerc says he was surprised he was still in the race after a near miss with Sergio Perez on the opening lap of the Miami Grand Prix.