Fixing rewritebase