By now first lieutenant of a flagship, Beaver looked forward to further promotion to his own command. He was to be disappointed however, by the time Elphinstone, by now Lord Keith, was appointed to command the Mediterranean Station a year later, Beaver had not received a promotion, and followed Keith as first lieutenant of the new flagship, HMS "Foudroyant", later moving to HMS "Barfleur". He appears to have clashed with the junior lieutenants under his command, as they seemed to him to be appointed for promotion rather than for duty. He brought Thomas Cochrane, then a junior lieutenant, to a court martial for disrespect. Cochrane was acquitted, but warned against flippancy. Beaver was told that the charge ought not to have been pressed. Beaver was made a commander on 19 June 1799, and Keith appointed him a few months later to serve aboard the flagship as acting assistant captain of the fleet. Beaver was placed in command of the bombardments as part of the Siege of Genoa in April and May 1800, and the allied forces eventually forced the surrender of the French commander André Masséna. He was sent home to England with the dispatches of the victory, but by the time he arrived the Battle of Marengo had been fought and Genoa had again fallen to the French. Beaver had hoped for a promotion after the victory, but this turn of events meant that it was not to be and he returned to Keith.