fix some deletion errors