Added rack rewrite to simplify debug