fix templates and filestorage