fixes #182

replaced calls to getActivity() with a WeakReference