fix python2/3 incompatibility

bytes built-in is different in python2