Cast NSUInteger to unsigned long to avoid 64 bit warning