Fix socket is busy bug