Fixes #116: Bug with negative ratings on save

Also adds a test that repros the issue.

Test plan: Before fix, ran `make test` which failed. After fix, the test passed.