Add sanity checking