Refix base64 and update tests