tree fix + base64 encode