Fix script error that would occur sometimes when unchecking "Show finished reports"