add deadlock prevention to Send