Fix bug in visualization.