Working after swapping async base64 function with synchronous one