Fix resize on mouseleave