fixed some final bugs that came up in visualization.