Minor bug fix in average.spec.se() function