some improvements / fixes for rule error reporting