Implemented statistics in rewrite and fixed a route