fix frame rate issue using dirty rects