fixed the layout assigning