More layout fixes for issue #1780