Fixed bugs in the loan program settings logic