fix rule unloading