Fix some upgrades not taken into account
Fix wrong order of startup events
Rebuild files