Fixing Templating and error page