bugfix primarykey, paths in template