Improve the previous 2.6 fix: use bytes rather, than string.
Also, optimize for better speed.