Fixed a bug in updating loan stats.

The library field was getting lost when the loan is updated. Fixed it by
retaining already existing fields.