more python 3x fixes