Make k and kmax ints.