cleanup
- fix timeout bug
- synchronize outqueue