fixed a visit summary printout bug