update position on resize