fix rewrite module setup