Fixed errors when deleting product collection or items (#735)