fixing issues with o2o rewrites