Remove WeakReference racecondition

fixes #27