reduce flicker when updating