fixed sanity check