(pseudo)fix for base64 encoding not working properly