Corrected generate statistics script

Signed-off-by: David Saradini <david.saradini@me.com>