Fixed a bug which caused the html reports to not be created in some cases