fix encode bug ... my fault...