fixed clear relations bug