fix reference validation