Update code for new changes in Xcode beta