Fixed a bug with error in Connecting state