Update fieldplot.js

Fixing some bugs.

Might still be an issue where it attempts to get the same index numerous times.