trying to fix rewrites