fixed Xcode %ld warnings