Make sure we're within the level range

Fixes #7