Fixed a bug that nested folders in templates folder was not processed