Small change for performance

Breaking a loop early