correct ref comparisons