Move Unicode finalization further down in the chain.
Fixes bug #525620.
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index b22009d..f0727d3 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -219,11 +219,6 @@
 	/* Disable signal handling */
 	PyOS_FiniInterrupts();
 
-#ifdef Py_USING_UNICODE
-	/* Cleanup Unicode implementation */
-	_PyUnicode_Fini();
-#endif
-
 	/* Cleanup Codec registry */
 	_PyCodecRegistry_Fini();
 
@@ -268,6 +263,11 @@
 	PyInt_Fini();
 	PyFloat_Fini();
 
+#ifdef Py_USING_UNICODE
+	/* Cleanup Unicode implementation */
+	_PyUnicode_Fini();
+#endif
+
 	/* XXX Still allocated:
 	   - various static ad-hoc pointers to interned strings
 	   - int and float free list blocks