Fixed undefined indexes in ILL loans