fixed flickering on resize buttons