Fixed the mechanism of showing the connection error messages