Improvement: Connection reverted to previous when error occurs while connecting to new one