add some more sanity checks