Fix command generation, use getOptions instead of getArguments.