Fix encoder example