Possible fix for deleting elements with transaction