Resizes bg automatically