fixed encoding to base64