Fix issues with rotation

see: getActivity != null