BUG: Py3 compatibility changes.