Fixed “~r” bug for relations.