Fix encoding and spaces