fix delete photo problem