Replace unnecessary reference with a better one