Fixed NPEs in cursor fragments when detached from activity