Bug fixes in the computation of LLF and the social optimum (projection function)