Correct order of initialization for variables