BUG: fix python 3 support.