Improved relations performance a bit.