Fix attached callbacks order
Handle merging mods
Build dist