Fixing stupid mistake in which socket options should have been set right away.