Return INT_MAX in error case (squash me later)