Fixed a bug with ndarrays in plot3d