Fixed minor bug when connecting messages.