fix a bug in genReport