fix the bug of delete photo