Fixes in APIS/Sockets