Fix height computation