Fixed the order of firing mod events