Final Py3K compatibilty fixes