Fixed a few bug in the data reduction. Reduce plot is cleared before each refresh.