fix issues with layout and backgrounds