Fixes in layout for issue 1044
Hopefully fully implement issue 1044