Fix encoding call