Fix bugs in calculateLPPList procedure