fix delete photo and text bug