fix re and fix response encode