fixed wrong sanity check