fix some visualization bugs