fix order of socket calls