fix routing error and add rootPath to css in templates