Fixed Socket Leak and failure to return