clean up some sanity checks