Solve an "array overflow" bug found in xcode6-beta-2