Some Python3 related fixes.