fixed compile error from xcode