Correct sample encoding