fixed resize issue, offsets were not being recomputed on resize