Fixed double run of lottery issue and added summary output.