Encoding actually works now