Change sanity check to actually check sanely