Correct call of objective function.