fix some compile bug in xcode.