fix certificate error