bug fix for visualization