Added socket check
debugging
fixed int
fixed connect