fix thread sleep problem with actors