Fixed Xcode6 compilation errors