fixed divide-by-0 problem in error analysis script