correcting indexOf condition in History.getFragment