Python3 bytes compatibility