fix nasty errors in create_comm_thread