base64 & other fixes