Fixed py2.xx compatibility issue due to bytes() difference