Fix int/unsigned int comparisons in original implementation.

This is just to stop the compiler from spamming my terminal with
warnings every time I build the extension.