Improved the initialization and initialization cancellation code.