Fixed an issue occasionally causing timeout errors when generating PDF reports, particularly for comparison plans