Fixed serious bug relating to max data points