fixed sanity checks