Fix for Python 3 -- use a slice rather than a single element to keep things as byte strings