Fixes to ui for rules definition.