Use the correct width when calculating row heights.

Fixes #758