Fix input sanity check.