Correct infinite loop when encountering unknown options