Fixed various window resize bug in the carousel mode