Fix for relation deletion