fix bug: when rule is empty.
filter out empty entries.