Fixed incorrect fragment index in previousFragment().