ref #66: more sanity checking