fixed bug with Encode UI