Fix refresh bug which sometimes happens when the plot configuration is changed. ...