fix compile errors caused by Xcode beta 3