a bugfix in rewriting rules

...tern