Fixed error in index template.

.Error occured if $url and $code aren't set.