Confirmed socket cleanup fix