Test and fix Base64 encoding methods