fix ca encoding issue