Fixing length calculation on base64 encode.