64Bit optimisation, replace int to NSInteger to use long on 64Bit.