Loop improvement

We don't need to run throug he loop completely when the arg is found.

Change-Id: Ie8eed3bf871c3a9a82b2e96cdc7f25d09c1a229d