fixed problems with scatterplot