change unload order
Merge pull request #2410 from gamb/master

change unload order