"Optimal Agency Contracts: The Effect of Vicarious Liability and Judicial Error"