added base64 encoding for special urls
fixed bug