Bughunt/stresstest

various bugfix implemented when stress testing the application. some doubts about the log queue, need review