fixing B64 generation