fix error log messages when connecting