fixed bug which highlighted last li on resize