fixed $(window).resize() behavior