Manage fragments programmatically and corrected nullpointer on
swapcursor