Fix parse arg loop to terminate on no more args