Fixed option validating code to work with the new parser.