fix issues with plot3