encode quick fix