Fix layout and scrolling functionality