Fixes issue with deleting products that are related to other products