fix NullPointerException on canceling rule dialog