Fixed bug and visualization tools