fixing error with layout2