Make sure the fragment is attached to the activity when trying to update the UI in onPostsLoaded