fixed visualize bug