Remove WeakReference racecondition

fixes #4