fix compile error by xcode