Correct code flow at start up