Improve bavkground size changing logic