fix cost estimation (diagonal)