Makes sure that stuff is loaded in the correct order