Converting some of the -1s to NSIntegerMax