Fix switch statement in opt parser