Fix average rating

Fixes #12