Fixing bug in read_plot