Fix solution to problem #8 (used sum instead of product)