Fix encoding and setup config