exit early logic fix