document template encoding issue fixed