bugfix for plotting.