Fix option number checking after option parsing