Moved initialization & deinitialization down. [skip ci].