The Chronicles of Narnia: Prince Caspian

1,300Â Narnian years after the Pevensie siblings left, Caspian, a Telmarine prince and heir to the throne, is informed by mentor Doctor Cornelius that his uncle, Miraz, is plotting to kill him and seize the throne for himself and his newborn heir. Cornelius gives him Queen Susan's ancient magical horn, instructing him to blow it only at his greatest need. Caspian flees into the woods where he encounters two Narnian dwarfs, Trumpkin and Nikabrik, and a talking badger named Trufflehunter, and blows the horn to summon help.
Only one year in England has passed since the Pevensie children returned from Narnia. The children are waiting for a tube train when the station suddenly starts collapsing and they are magically transported to Narnia. At first they are overjoyed, but soon realize that much time has passed since their last visit, and their castle at Cair Paravel is in ruin with evidence it was attacked by catapults.
In the Telmarine castle, the lords of the council learn that Prince Caspian is gone, and Miraz, using Trumpkin, who has been captured, persuades them to attack the Narnians to retrieve Caspian while secretly plotting to kill him instead. Lord Sopespian suspects Miraz's motives, and discusses his treasonous thoughts with his ally, General Glozelle.
The Pevensies save Trumpkin from being drowned by two Telmarines; he realizes that the four children are the Kings and Queens of Old and they continue on together. Lucy glimpses Aslan and tries convincing the others that she has seen him; only Edmund believes her.
Nikabrik and Trufflehunter lead Caspian to a gathering of the old Narnians, where he convinces them to help him win his throne so he can return their land. They meet the Pevensies and Trumpkin, and all journey to Aslan's How. Peter decides they will attack Miraz's castle, rejecting Lucy's advice that they wait for Aslan to return.
The Narnians raid Miraz's castle, but Caspian ruins the plan by freeing Cornelius instead of opening the gate. He learns that Miraz killed his father, and confronts Miraz but is wounded. Overwhelmed, Peter calls for a retreat. Peter, Susan, Edmund, Caspian and the Narnians escape with heavy losses. Upon returning to Aslan's How, Peter and Caspian argue, while back at the castle, Miraz is crowned King.
Nikabrik, with the aid of a hag and a werewolf, offers Caspian his help to guarantee victory. The hag uses black sorcery to summon Jadis, the White Witch. From inside a wall of ice, the White Witch tries convincing Caspian to free her, when Peter, Edmund, Lucy and Trumpkin arrive. Peter kills the hag, Edmund kills the werewolf, and Trumpkin stabs Nikabrik when he attacks Lucy. Peter knocks Caspian aside to face the Witch himself, but begins to be entranced, until Edmund shatters the ice, destroying the Witch's apparition.
As Miraz and his army arrive at Aslan's How, Caspian suggests Peter and Miraz duel to the death, with the loser's army to surrender, to buy Lucy and Susan time to find Aslan. Miraz agrees to the duel, not wanting to look like a coward in front of his men. The girls are attacked by Telmarine soldiers, so Susan remains behind to fight them while Lucy continues alone. Peter defeats Miraz, and gives Caspian his sword to finish him off, but Caspian spares Miraz's life. Sopespian kills Miraz with one of Susan's arrows and accuses the Narnians, leading to a battle, with the Telmarines gradually winning. Lucy finds Aslan in the woods and he awakens the trees, turning the battle in the Narnians' favour. Sopespian orders retreat to a bridge, where they are confronted by Lucy and Aslan. Aslan summons the river god, who destroys the bridge, killing many of the soldiers, swallowing Sopespian and winning the battle.
Caspian invites the Telmarines to remain in Narnia if they will coexist peacefully with the Narnians; but if they wish, they can return to the human world from which they originally came to Narnia. Some, including General Glozelle, agree to do so, and Aslan creates a portal for them and the four Pevensies. Susan kisses Caspian, knowing they will never meet again, as Aslan told her and Peter that they will never return to Narnia. The Pevensies return to England, leaving Caspian as King.

Question: who  ruins the plan by freeing Cornelius instead of opening the gate?
Answer: Caspian; Caspian