Fix for fatal bug in layout.