Fixed bug with name encoding length possibly being different.