fix visualization bugs