Fix array off-by-one error

GODDAMNIT! Numerical recipes shit is fortran port. The code
assumes that array is from x[1] .. x[n] and not x[0] .. x[n-1].

Fix that and other mistakes.