fix a minor bug in visualization part