Threadsafe global listeners

fixes #9