more range checks for ext/tidy