Fixed problems in call of encoder functions