make sure checking current platform.
fixed compile error from xcode.