For some reason base64 encoding was including newlines.