very strange javascript error for other relationships