Fix some edge cases in computeRowHeight