fixed creation of bad relation