Fix arg parsing in script

The previous change here broke the call order for extension command.