Fix some C integer size related bugs that were causing addReach/subReach to return nonsense. Changed order of arguments for subReach to make them more consistent with addReach.