Fixed
Implemented proper connection error handling