Improve 256 <-> 65535 conversion