fix sanity check