Fix warnings about format string and change int to NSInteger