Fix getting list of the templates