removed flickering artifacts when resizing