fixes visualize_shapes bug