Fixed bug in redirect. Also index template links.