Clean up alg and base64 headers