Fixed Socket logic