Fix loanstatn.php

@93d0e008 undid some bug fixes from last week, but I think this was not intended ...