fix freezing problem on plot viewer