grid and layout fixes