fixed the order of loading files.