fix visualization bug