remove unnecessary frame repaints