bugfix: avoid release of event handler in different threads

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>