Fix xcode type conversion warning