fixing iOS connection bug
adding onConectError block