Fix problems with rewriting under centos