removed try finally for thread support