fix loan bug