fix rules is not cleared before reloading bug

Sorry about the mistake in previous commits.