properly resize background