Passage: Leo Tornikios Kontoleon arrived as Basil's successor in May of that year. After Basil's death, Melus revolted again; this time, he used a newly arrived band of Normans sent by Pope Benedict or who met him (with or without Guaimar's aid) at Monte Gargano. Tornikios sent an army, led by Leo Passianos, against the Lombard-Norman coalition. Passianos and Melus met on the Fortore at Arenula; the battle was either indecisive (William of Apulia) or a victory for Melus (Leo of Ostia and Amatus). Tornikios then took command, leading his forces into a second encounter near Civita. This second battle was a victory for Melus, although Lupus Protospatharius and the anonymous chronicler of Bari recorded a defeat. A third battle (a decisive victory for Melus) took place at Vaccaricia; the region from the Fortore to Trani was in his hands, and in September Tornikios was replaced by Basil Boiannes (who arrived in December). According to Amatus, there were five consecutive Lombard and Norman victories by October 1018.At Boioannes' request, a detachment of the elite Varangian Guard was sent to Italy to fight the Normans. The armies met at the Ofanto near Cannae, the site of Hannibal's victory over the Romans in 216 BC, and the Battle of Cannae was a decisive Byzantine victory; Amatus wrote that only ten Normans survived from a contingent of 250. After the battle, Ranulf Drengot (one of the Norman survivors) was elected leader of their company. Boioannes protected his gains by building a fortress at the Apennine pass, guarding the entrance to the Apulian plain. In 1019 Troia (as the fortress was known) was garrisoned by Boioannes' Norman troops, an indication of Norman willingness to fight on either side. With Norman mercenaries on both sides, they would obtain good terms for the release of their brethren from their captors regardless of outcome.Alarmed by the shift in momentum in the south, Pope Benedict (who may have initiated Norman involvement in the war) went north in 1020 to Bamberg to confer with Holy Roman Emperor Henry...

Question: What did Boionnes dp to protect his gains?
building a fortress