Correct order of functions.