enc/dec fix