some sanity checks