make rewrites actually work correctly so that even for JSON we do not have to supple...