correction to loan close functionality