Fixed bug in reporting script