Fix bug Photo not deleted properly