- fix NPE when used in view pager and the fragment is not attached to the activity yet