Fixed issue that would cause division by 0 when outputting to excel