Now use maximum integer instead of -1.