bugfix for blocking socket