ugh. fix my last fix, and add a sanity-check test