The Captain is ultimately responsible however, if a member of crew does not "perform to a reasonable expected standard", this can mitigate the level of the Captains culpability. Captain of HMS Nottingham was on board as she ran aground but the XO caught the incoming.