fixed some python 2 bytes issues