Fixed issue with byte slice encoding