Fix encoder