fix compiler warnings

This PR fixes 2 compiler warnings about implicit conversions from NSUInteger to uint32_t.