various fixes to layout