fix bug when create certificate wit no images
fix bug in update certificate when remove image