fixed sanity check bug...whoops! That's what I get for committing code that wasn't tested...