add a klass check when parsing rule
add Proto.