He was given command of the brig "Firefly" in the war with Algiers in 1815 ; was commissioned master-commandant, April 27, 1816, and assigned to the command of the ship "Peacock" in the Mediterranean, 1816-18.