Bugfix: Use signed types so that j can go negative without underflow

In some cases, j made it negative which made (j > high) true creating a segfault condition