fix bugs in base64

fix bugs in base64