Apple 'stunned' to find flaw in iPhone 4