Add more sanity checking.