Better detection of valid bounds