Fix a bug in the connection of adjacent balls