Added the support for fact if there isn't class for fact's template, will using array instead.