fix compile error on xcode