Rewrite rule, fixes #37