Some more Python 2.x fixes