Final fix of startup code