Make change to compatible with Xcode 6.0.1

some changes to fit with Xcode 6.0.1