Fixes an issue with NSUInteger conversion

The issue did raise warnings when compiling with 64bit.