Fix building relations