fix a bug in getActivity