relation bugfixes