Fix bug with connection colouring