fixed logic error when loading templates fallback