Fix encoding and method visibility issues