fix raising cert invalid when edit entity