Fixed erroneous encoding