fixes for old socket implementation