corrected sanity check