Logic for loan cycle is incorrect