Fix: Problem when trying to write before being connected