fix current fragment index check when multiple fragments have same index