bug fix regarding unshifted ref traces