Reformated rewrite xml part - can't say why but apparently this fixes bug #2624