decoder: improve transformation