Fixed type casting issues for NSInteger and NSUInteger types