2013-06: fixed that the programm would not exit because a threadpool was not shutdown correctly and other issues