some fixes to loan example