Fix bug where some cli args were wrongly ignored because of their order