fix calculateFragmentGroup BUG