optim(), upper, lowerbound k_index corrections