Don't let sanity overflow.

Fixes #22