Apple Scrambles to Fix Software Bugs Affecting its Next iPhone