fix bug in ending report