fix bug with base64.b64encode()