BUG: Cast to bytes for python 3.2