Added warning messages when deleting objects.