removed base64 encode
fixed a small bug