fix encode in signature