fix button style bug on the first slide when resizing