fix socket call

I should triple check next time I rewrite the commits.