The cost of moral hazard and limited liability in the principal-agent problem