Nelson appointed him to command the captured French 12-gun privateer schooner ; her name was changed to HMS "Crafty". He was injured by an oar on board "Crafty"s jolly boat, which may have left a permanent mark on his health. He did not take part in the Battle of Trafalgar but he had lost a useful friend in Nelson. In 1806, he captured vessels running sulphur from Sicily to Toulon, France, for making gunpowder. He took part in the Battle of Maida, in which his vessel harassed the retreating French army. By successful diplomacy, he obtained the release of Christian slaves from the Dey of Algiers. He personally saved his ship from accidental destruction by the much larger HMS "Eagle", in Valletta harbour. He had to surrender his ship to three Spanish privateers, in 1807. He was later cleared by court martial for the loss of "Crafty", but was reprimanded for having lost contact with , with which he had been in company, and for staying too long at anchor in the harbour where the Spanish found him.