fix socket factory