Fixes example code in encoding