bug on href rewrite