Cell height calculation improvement